package com.vcredit.creditcat.enumtype.hl;

public enum HouseHoldEnum {

	BENDIJI(1, "HOUSEHOLD/BENDIJI", "本地籍贯"), FEIBENDIJI(2, "HOUSEHOLD/FEIBENDIJI", "非本地籍");

	private int code;
	private String value;
	private String desc;

	private HouseHoldEnum(int code, String value, String desc) {
		this.code = code;
		this.value = value;
		this.desc = desc;
	}

	public static String getCodeByDesc(int code) {
		for (HouseHoldEnum c : HouseHoldEnum.values()) {
			if (c.getCode() == code) {
				return c.value;
			}
		}
		return FEIBENDIJI.getValue();
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

}
